//
//  XFDUserManage.h
//  BlocksKit
//
//  Created by 韩冰 on 2017/11/13.
//

#import <Foundation/Foundation.h>
@class XFDUserModel;

typedef NS_ENUM(NSUInteger, XFDUserType) {
    XFDUserTypeFlyer,
    XFDUserTypeAdmin
};
typedef NSString *user_type_key NS_EXTENSIBLE_STRING_ENUM;
UIKIT_EXTERN  user_type_key const user_type_flyer;
UIKIT_EXTERN  user_type_key const  user_type_admin;

@interface XFDUserManage : NSObject

#pragma mark - save

//1.存储账号
+ (BOOL)saveAccount:(NSString *)phoneNum;

//2.存储密码
+ (BOOL)savePassWord:(NSString *)passWord;

//3.存储Token
+ (BOOL)saveToken:(NSString *)token;

//8 存储用户信息
+ (void)saveUserModel:(XFDUserModel *)model;

//15 存取用户类型
+ (void)saveUserType:(user_type_key)key;

#pragma mark - get
//4.获取账号
+ (NSString *)accountPhone;

//5.获取密码
+ (NSString *)passWord;

//6.获取Token
+ (NSString *)accessToken;

//9.获取用户信息
+ (XFDUserModel *)getUserModel;

//11.是否登录
+ (BOOL)isLogIn;

//13.用户身份
+ (XFDUserType)getUserType;

//14.获取用户
+ (NSInteger)getUserID;


#pragma mark - delete

//7.删除token
+ (BOOL)deleteToken;

//10.删除用户信息
+ (void)removeUserInfo;


#pragma mark - device
/// 获取平台
+ (NSString *)getPlatform;

/// 获取软件版本
+ (NSString *)getAppVersion;

/// 获取手机唯一标识符
+ (NSString *)udId;

/// 获取设备名称
+ (NSString *)deviceName;

@end
